<template>
  <ConfigProvider :locale="locale">
    <router-view />
  </ConfigProvider>
</template>
<script lang="ts">
import { defineComponent } from "vue";
import { ConfigProvider } from "ant-design-vue";
import { i18n } from "/@/locales";
import env from "/@/base/env";

export default defineComponent({
  components: {
    ConfigProvider,
  },
  setup() {
    let locale: any = null;
    if (i18n && i18n.global) {
      const message = i18n.global.getLocaleMessage(env.lang);
      locale = message.antdLocale;
    }
    return {
      locale,
    };
  },
});
</script>

<style>
#app {
  width: 100%;
  height: 100%;
}
</style>
